<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
	<script type="text/javascript">
		
		/*
		$(document).ready(function(){
			var $div1 = $('#div1');
			alert($div1);
		}) */

		//ready的简写
		$(function(){
			var $div1 = $('#div1');
			alert($div1);
		})

	</script>
</head>
<body>
	<div class="box" id="div1">这是一个div</div>
</body>
</html>